﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace YJKCoordinate
{
	public abstract class InputDataPackerBase
	{
		public Dictionary<UseParameterEnum, double> GetParameters(int index = 0)
		{
			return this.lstInputParameter[index];
		}

		public Dictionary<PipeUseParameterEnum, double> GetPipeParameters(int index = 0)
		{
			return this.lstPipeInputParameter[index];
		}

		public XYZ GetPoint(int index)
		{
			return this.lstPoints[index];
		}

		public CornerKindEnum CornerKinde
		{
			get
			{
				return this.cornerKind;
			}
		}

		public Dictionary<UseParameterEnum, double> TransDicParam(Dictionary<int, double> inputParameter)
		{
			Dictionary<UseParameterEnum, double> dictionary = new Dictionary<UseParameterEnum, double>();
			foreach (KeyValuePair<int, double> keyValuePair in inputParameter)
			{
				dictionary.Add((UseParameterEnum)keyValuePair.Key, keyValuePair.Value);
			}
			return dictionary;
		}

		public Dictionary<PipeUseParameterEnum, double> PipeTransDicParam(Dictionary<int, double> inputParameter)
		{
			Dictionary<PipeUseParameterEnum, double> dictionary = new Dictionary<PipeUseParameterEnum, double>();
			foreach (KeyValuePair<int, double> keyValuePair in inputParameter)
			{
				dictionary.Add((PipeUseParameterEnum)keyValuePair.Key, keyValuePair.Value);
			}
			return dictionary;
		}

		public int GetFamilyFileIndex(int index)
		{
			return this.useFamilyFileIndexs[index];
		}

		protected List<int> useFamilyFileIndexs = new List<int>();

		protected List<XYZ> lstPoints = new List<XYZ>();

		public CornerKindEnum cornerKind;

		public List<Dictionary<UseParameterEnum, double>> lstInputParameter = new List<Dictionary<UseParameterEnum, double>>();

		public List<Dictionary<PipeUseParameterEnum, double>> lstPipeInputParameter = new List<Dictionary<PipeUseParameterEnum, double>>();
	}
}
